package com.smedi.ismedi.progress.core.domain.repository;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.constructionproject.api.dto.response.ProjectBasicResponse;
import com.smedi.ismedi.progress.api.dto.response.ProgressKanBanStatisticResponse;
import com.smedi.ismedi.progress.core.application.command.ProgressKanBanQuery;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ProcessTask;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.Progress;
import com.smedi.ismedi.progress.core.domain.dto.VersionManageQuery;

import java.util.List;

/**
 * @author Cookie
 * @date 2022/09/16
 */
public interface ProgressRepository {
    /**
     * 获取 进度计划 信息
     * <p>
     * /**
     * 获取 进度项目 分页信息
     *
     * @param offset
     * @param pageSize
     * @param projectId
     * @param mainCourtyard
     * @param projectManager
     * @param status
     * @param projectCategory
     * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.smedi.ismedi.progress.core.domain.aggregatemodel.Progress>
     * @return
     */
    Page<Progress> getProgressPage(Long offset, Long pageSize, Long hrOrganizationId, Integer projectId, String projectManager, Integer mainCourtyard, Integer status, String projectCategory);

    Page<Progress> getProgressPageByApp(Long offset, Long pageSize, Long hrOrganizationId,Integer projectId, String appSearch, Integer progressStatus);

    Progress saveVersionManage(Progress versionManage);

    Progress getVersionManageOne(VersionManageQuery versionManageQuery);

    void selectAndUpdate(Progress versionManage, ProjectBasicResponse projectData);
    /**
     * 获取 进度看板 分页信息
     * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.smedi.ismedi.progress.core.domain.aggregatemodel.Progress>
     * @date 2022/9/21 16:31
     */
    Page<Progress> getProgressKanBanPage(ProgressKanBanQuery progressKanBanQuery);

    ProgressKanBanStatisticResponse getProgressKanStatisticBanPage(Long hrOrganizationId);

    List<Progress> getProgressKanLagProjectPage(Long hrOrganizationId);

    List<ProcessTask> getProgressScheduleProcess(Long id);

    void editVersionNullify(Long version, Long projectId);

    List<Long> getVersionDownByVersionNoAndProjectId(Long version, Long projectId);
}
